package com.woniuxy01;

import java.io.FileInputStream;
import java.io.IOException;

public class Test06 {
    public static void main(String[] args)  {
        FileInputStream fis=null;
        try{
            fis = new FileInputStream("a.txt");
            byte[] bytes=new byte[3];
            int length=0;
            while((length=fis.read(bytes))!=-1){
                System.out.println(new String(bytes,0,length));
            }
        }catch (IOException e){
            e.printStackTrace();
        }finally {
            try {
                if (fis!=null) {
                    fis.close();
                }
            } catch (IOException e) {
                e.printStackTrace();
            }
        }

    }
}
